<?php

namespace common\models\folder;

use Yii;

/**
 * This is the model class for table "{{%member_commission_logs}}".
 *
 * @property string $id
 * @property string $user_id 用户Id
 * @property string $total 订单总价
 * @property string $model
 * @property string $model_id
 * @property string $created_at
 * @property string $updated_at
 * @property string $deleted_at
 * @property int $status 状态：-1关闭，0未审核，1已审核
 */
class MemberCommissionLogs extends \common\db\ActiveRecord {

    use \common\traits\Constants;

    CONST STATUS_ACTIVED = 1;
    CONST STATUS_DEFAULT = 0;
    CONST STATUS_DELETED = -1;

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return '{{%member_commission_logs}}';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['user_id', 'total', 'model_id', 'created_at', 'updated_at', 'deleted_at', 'status'], 'integer'],
            [['model'], 'required'],
            [['model'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'user_id' => '用户Id',
            'total' => '订单总价',
            'model' => 'Model',
            'model_id' => 'Model ID',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'deleted_at' => 'Deleted At',
            'status' => '状态：-1关闭，0未审核，1已审核',
        ];
    }

}
